# 3、这是一个字符串排序，排序规则:小写<大写<奇数<偶数
str1 = 'asdf234GDSdsf23'
def sort_2(str):
    int1 = []
    int2 = []
    upper = []
    lower = []
    for i in str:
        if i.isdigit():
            if int(i)%2==0:
                int2.append(i)
            else:
                int1.append(i)
        elif i.isupper():
            upper.append(i)
        else:
            lower.append(i)
    return sorted(lower)+sorted(upper)+sorted(int1)+sorted(int2)
print(sort_2(str1))